<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddRepairTaskIdIndexInTaskRepairTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task_repair_order')
            ->addIndex(['repair_task_id'], ['type' => 'normal', 'name' => 'idx_repair_task'])
            ->save();
    }

    public function down()
    {
        $this->table('task_repair_order')
            ->removeIndexByName('idx_repair_task')
            ->save();
    }
}
